﻿namespace DatabaseProxy.ObjectSql;
public class ObjectSqlDeleter<T> where T : IDatabaseTable
{
    private static string _baseSql = "";
    public static string Sql(string condition = "")
    {
        if (string.IsNullOrEmpty(_baseSql))
        {
            _baseSql = $"DELETE FROM {Tool<T>.TableName}";
        }
        return string.IsNullOrEmpty(condition) ? _baseSql : $"{_baseSql} WHERE {condition};";
    }
}
